# Contributor: Maxim Karasev <mxkrsv@disroot.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=ffuf
pkgver=2.1.0
pkgrel=4
pkgdesc="fast web fuzzer written in Go"
url="https://github.com/ffuf/ffuf"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="https://github.com/ffuf/ffuf/archive/refs/tags/v$pkgver/ffuf-$pkgver.tar.gz
	fix-csv-test.patch
	"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o build/ffuf
}

check() {
	go test ./...
}

package() {
	install -Dm755 build/ffuf "$pkgdir"/usr/bin/ffuf
	install -Dm644 ffufrc.example \
		"$pkgdir"/usr/share/doc/ffuf/ffufrc.example
}

sha512sums="
15389b483b0e93c152377dca28857ff691ab1d93a992575cbb22292e5117f6535f6186aeeae9eefc0ecdb00ba30023fc35a232178f7e6e426e4c8cd80810f239  ffuf-2.1.0.tar.gz
d50c2c937c81b806f44ee0101ac4d6f6a8f7af653daffbc28802c8a1e7293e7e513f96bf74e53219a58cc8ff4c249e49934d5d4a7a15d05bce70e34c50ac1be7  fix-csv-test.patch
"
